<template>
  <div>
    <img src="./assets/logo.png" alt="logo" />
    <h1 v-text="msg" ref="title"></h1>
    <School></School>
    <button ref="btn" @click="showDOM">点我输出上方的DOM元素</button>
  </div>
</template>

<script>
import School from "./components/School";
import Student from "./components/Student";
export default {
  name: "App",
  components: {
    School,
    Student,
  },
  data() {
    return {
      msg: "欢迎学习Vue!",
    };
  },
  methods: {
    showDOM() {
      console.log(this.$refs.btn);
    },
  },
};
</script>